package hos.controller;

import hos.po.P_condition;
import hos.po.P_hospitalization;
import hos.po.P_information;
import hos.service.P_hospitalizationServiceImp;

public class P_hospitalizationController {
	public void P_hospitalizationCreate(P_condition p_cond) {
		if(p_cond.getP_result().equals("住院")) {
			System.out.println(p_cond.getP_id());
			P_hospitalizationServiceImp p_hosService = new P_hospitalizationServiceImp();
			P_hospitalization P1 = new P_hospitalization();
			P1.setP_id(Integer.parseInt(p_cond.getP_id()));
			String res = p_hosService.P_hospitalizationCreate(P1);
			System.out.println(res);
		}else {
			System.out.println("无需住院");
		}
	}
}
